<?php echo $this->render('cabecera.phtml'); ?>

<div id="content" class="row-fluid">
 
<!--/menu izquierdo -->
<div class="span3">
    <div class="well sidebar-nav">
        <ul class="nav nav-list">
            <br>
            <center><?php echo $this->render('logo.phtml'); ?></center>
            <br>
            <div class="alert alert-resaltar">
                <li class="nav-header">OPCIONES</li>
                <li><a href="/" >Volver</a></li>  
            </div>
            <br>
            <center><?php echo $this->render('facebook.phtml'); ?></center>
            <br>
        </ul>
    </div><!--/.well -->
</div><!--/span-->


<!--/panel derecho-->
<div class="span9">
    <div class="hero-unit">
        <center><h2>Listado de todos los articulos existentes en el blog</h2></center>
    </div>
    <?php if ($this->cliente) { ?>
        <?php if ($this->cliente->role == "admin" || $this->cliente->role == "adminBlog") { ?>
            <div class="alert alert-info">
                <h2>Opciones de Administrador</h2>
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $this->url(array(
                        'module'=>'blog',
                        'controller'=>'articulos',
                        'action'=>'crear'));?>"
                       class="btn btn-large btn-warning">Crear un artículo nuevo</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $this->url(array(
                        'module'=>'blog',
                        'controller'=>'articulos',
                        'action'=>'huerfanos'));?>"
                       class="btn btn-large btn-warning">Ver artículos huerfanos</a>
            </div>
        <?php } ?>
    <?php } ?> 
    <br>
    <div class="items askew">
        <?php foreach($this->articulos as $art) : ?>
            <div    class="item" 
                    onclick="location.href='<?php echo $this->url(array(
                        'module'=>'blog',
                        'controller'=>'articulos',
                        'action'=>'ver', 
                        'id'=>$art->id));?>'">
                <img src="<?php echo $art->imagen; ?>" height="200px" width="200px"/>
                <div class="alert">
                    <!--<button class="close" data-dismiss="alert">x</button>-->
                    <button class="close">
                        <div style="font-size: 12px; float:left; margin-top: 5px;">
                            <?php echo $art->cant_coment; ?>
                        </div>
                        <i class="icon-comment" style="margin-top: 5px;"></i>
                    </button>
                    <?php echo $art->nombre ?>
                </div>
            </div>
        <?php endforeach; ?>
        <div class="expansor"></div>
    </div>
</div><!--/span-->

</div><!--/contentrow-->

<?php echo $this->render('pie.phtml'); ?>